package com.docmgmt.mvp.dto;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Pattern;
import lombok.Data;

/**
 * 添加知识库成员请求（KB-008）
 *
 * @author Dora
 */
@Data
@Schema(description = "添加知识库成员请求")
public class AddKbMemberRequest {

    @NotNull(message = "成员ID不能为空")
    @Schema(description = "成员ID（用户ID或部门ID）", example = "42")
    private Long memberId;

    @NotBlank(message = "成员类型不能为空")
    @Pattern(regexp = "user|dept", message = "成员类型只能是user或dept")
    @Schema(description = "成员类型：user用户/dept部门", example = "user", allowableValues = {"user", "dept"})
    private String memberType;

    @NotBlank(message = "权限类型不能为空")
    @Pattern(regexp = "read|write|manage", message = "权限类型只能是read/write/manage")
    @Schema(description = "权限类型", example = "write", allowableValues = {"read", "write", "manage"})
    private String permissionType;
}
